////#define _CRT_SECURE_NO_WARNINGS 1
//#include<bits/stdc++.h>
//using namespace std;
//////http://oj33.cn/contest.php?cid=1075
////bool b[23] = {};
////int total;
////int a[23] = { 1 };
////int dfs(int t, int n);
////void print(int n);
////bool pd(int a, int b);
////int main()
////{
////	int n;
////	while (cin >> n)
////	{
////	
////		total = 0;
////		if (n > 0&&n<20)
////		{
////			if (n % 2 != 1)
////				cout << "Case " << ++total << ":" << endl;
////			dfs(1, n);
////		}
////		else
////			continue;
////	}
////	return 0;
////}
////int dfs(int t, int n)
////{
////	for (int i = 2; i <= n; i++)
////	{
////		
////		if (pd(a[t], i) && !b[i])
////		{
////			a[t] = i;
////			b[i] = 1;
////			if (t == n)
////			{
////				if (pd(a[n], a[1]))
////					print(n);
////			}
////			else
////			{
////				dfs(t + 1, n);
////			}
////			b[i] = 0;
////		}
////	}
////}
////void print(int n)
////{
////	if (a[1] == 1) 
////	{
////		for (int i = 1; i <= n; i++)
////		{
////			cout << a[i] << " ";
////		}
////		cout << endl;
////	}
////
////}
////bool pd(int a, int b)
////{
////	int t = a + b;
////
////	for (int i = 2; i < t; i++)
////	{
////		if (t % i == 0)
////		{
////			return 0;
////		}
////	}
////	return 1;
////}
//
//int ans[21] = { 1,1 };
//int to = 0;
//bool b[21] = { 1,1 };
//void print(int n)
//{
//	for (int i = 1; i <= n; i++)
//	{
//		cout << ans[i] << " ";
//	}
//	cout << endl;
//}
//bool check(int a, int b)
//{
//	int c = a + b;
//	for (int i = 2; i < c; i++)
//	{
//		if (c % i == 0)return 0;
//	}return 1;
//}
//void dfs(int k, int n)
//{
//	for (int i = 2; i <= n; i++)
//	{
//		if (!b[i] && check(ans[k - 1], i))
//		{
//			ans[k] = i;
//			b[i] = 1;
//			if (k == n)
//			{
//				if (check(ans[n], ans[1]))
//					print(n);
//
//			}
//			else {
//				dfs(k + 1, n);
//			}b[i] = 0;
//		}
//	}
//}
//int main()
//{
//	int n;
//	while (cin >> n)
//	{
//		to++;
//		if (n % 2 != 0)
//		{
//			cout << "Case " << to << ":" << endl;
//		}
//		else {
//	  cout << "Case " << to << ":" << endl;
//		dfs(2, n);
//		}
//		cout << endl;
//	}
//	return 0;
//}